/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.quentin.message;

import java.util.ArrayList;

/**
 *
 * @author Quentin
 */
public class GestionnaireMessages {
    private ArrayList<MessageTchat> mListMessage = null;

    public GestionnaireMessages() {
        mListMessage = new ArrayList<MessageTchat>();
    }
    
    public void ajouteMessage( MessageTchat messIn){
        if( mListMessage != null && messIn != null)
            mListMessage.add(messIn);
    }
    
    public ArrayList<MessageTchat> getListMessage(){
        return mListMessage;
    }
    public int getSize (){
        if (mListMessage != null)
            return mListMessage.size();
        else
            return 0;
    }
    
    public MessageTchat getMessage(int i){
        return mListMessage.get(i);
    }
}
